<?php

namespace App\Admin\Extensions\Nav;

use Encore\Admin\Facades\Admin;
use Illuminate\Routing\Router;
use App\Models\Term;
use App\Models\Crousesheet;
use App\Models\Notice;

class Links
{
	protected $now;
	protected $term_start_date;
    protected $week;
    protected $crousesheet_id;
	protected $num;

    public function __construct()
    {
        $this->term_start_date = Term::where('status','0')->value('start_date');
        $this->week =  ceil((time()-strtotime($this->term_start_date))/3600/24/7);
        //$this->crousesheet_id = Crousesheet::where('tutor_id',Admin::user()->id)->value('id');
        //$this->num = Notice::where('crousesheet_id',$this->crousesheet_id)->count();
    }
    public function __toString()
    {
        return <<<HTML
<li>
    <p class="navbar-text" id="" style="color:#FFFFFF;">第 {$this->week} 周</p>
</li>


HTML;
    }
}